package com.wwwc.index.web.servlet;

import java.io.*;
import java.text.*;
import java.util.*;
import javax.servlet.*;
import javax.servlet.http.*;
import javax.servlet.ServletRequestWrapper;
import java.net.*;

import javax.ejb.*;
import javax.naming.*;
import java.rmi.*;
import javax.rmi.*;

import com.wwwc.index.web.ejb.directory.*;
import com.wwwc.util.web.*;

public class LeftBarBean {

    public static StringBuffer getLogo () {
	StringBuffer sbf = new StringBuffer();
	sbf.append("<TABLE>");
	sbf.append("<TR><TD>\n");
	sbf.append("<A href='/html/3wccg.html' target='_blank'>\n");
	sbf.append("<IMG height ='70' width='70' border='0' src='/images/3wccg.jpg'></A>\n");
	sbf.append("</TD></TR>\n");
	sbf.append("</TABLE>\n"); 
	return sbf;
    }

    public static StringBuffer getSignInOutJoin (String user_name, String call_path) {
	StringBuffer sbf = new StringBuffer();
	sbf.append("<TABLE cellSpacing='2' cellPadding='2' border=0 align=center width=80%>\n");
	if(user_name == null || user_name.equals("guest")) {
	    sbf.append("<TR>");
	    sbf.append("<TD align=center style='BORDER:1px solid'>");
	    sbf.append("<A href="+call_path+"?tid=1 style='text-decoration: none;'>Sign In</A></TD>");
	    sbf.append("</TR>");
	    sbf.append("<TR>");
	    sbf.append("<TD align=center style='BORDER:1px solid'>");
	    sbf.append("<A href="+call_path+"?mid=72 style='text-decoration: none;'>Join Us</A></TD>");
	    sbf.append("</TR>");
	} 
	else {
	    sbf.append("<TR><TD align='center' style='BORDER:1px solid'><I><B>");
	    sbf.append(user_name);
	    sbf.append("</B></I></TD></TR>\n");
	    sbf.append("<TR>");
	    sbf.append(MyHtml.makeLinkCell("Sign Off", call_path+"?tid=sign_off"));
	    sbf.append("</TR>");
	}
	sbf.append("</TABLE>\n");
	return sbf;
    }

    public static StringBuffer getSideBars ()
    {
	StringBuffer sbf = new StringBuffer("");
	return sbf;
    }
}



